var xml2js = require('xml2js');
var builder = new xml2js.Builder();  // JSON->xml
  var parser = new xml2js.Parser();   //xml -> json
  var xmlreader = require("xmlreader")
  
  var et = require('elementtree');
var XML = et.XML;
var ElementTree = et.ElementTree;
var element = et.Element;
var subElement = et.SubElement;
// let xmlstr = `
// <GameFile>
//   <PropertyGroup Name="Skeleton" Type="Skeleton" ID="e4317e8c-7fb6-490b-9dc0-31ca13da6d1c" Version="3.10.0.0" />
//   <Content ctype="GameProjectContent">
//     <Content>
//       <Animation Duration="0" Speed="1.0000" />
//       <ObjectData Name="Skeleton" Tag="7" Length="20.0000" RotationSkewX="0.0000" RotationSkewY="0.0000" ctype="SkeletonNodeObjectData">
//         <Size X="0.0000" Y="0.0000" />
//         <Children>
//           <AbstractNodeData Name="Button_1" ActionTag="-2048506709" Tag="8" RotationSkewX="-1088.3690" RotationSkewY="-1088.3690" IconVisible="False" LeftMargin="-18.9598" RightMargin="-27.0402" TopMargin="-17.9992" BottomMargin="-18.0008" TouchEnable="True" FontSize="14" ButtonText="Button" Scale9Enable="True" LeftEage="15" RightEage="15" TopEage="11" BottomEage="11" Scale9OriginX="15" Scale9OriginY="11" Scale9Width="16" Scale9Height="14" ShadowOffsetX="2.0000" ShadowOffsetY="-2.0000" ctype="ButtonObjectData">
//             <Size X="46.0000" Y="36.0000" />
//             <AnchorPoint ScaleX="0.5000" ScaleY="0.5000" />
//             <Position X="4.0402" Y="-0.0008" />
//             <Scale ScaleX="1.0000" ScaleY="1.0000" />
//             <CColor A="255" R="255" G="255" B="255" />
//             <PrePosition />
//             <PreSize X="0.0000" Y="0.0000" />
//             <TextColor A="255" R="65" G="65" B="70" />
//             <DisabledFileData Type="Default" Path="Default/Button_Disable.png" Plist="" />
//             <PressedFileData Type="Default" Path="Default/Button_Press.png" Plist="" />
//             <NormalFileData Type="Default" Path="Default/Button_Normal.png" Plist="" />
//             <OutlineColor A="255" R="255" G="0" B="0" />
//             <ShadowColor A="255" R="110" G="110" B="110" />
//           </AbstractNodeData>
//         </Children>
//         <Position />
//         <Scale ScaleX="1.0000" ScaleY="1.0000" />
//         <CColor A="255" R="255" G="255" B="255" />
//         <BlendFunc Src="770" Dst="771" />
//         <BoneColor A="255" R="25" G="25" B="25" />
//       </ObjectData>
//     </Content>
//   </Content>
// </GameFile>`
//   var jsonstr =  parser.parseString(xmlstr);
// console.log(jsonstr)
let str = `{"ID":"92979beb-4402-448f-9a4a-002a2a35cac0","Version":"2.3.2.3","Name":"tomatoSkin","Content":{"Content":{"Animation":{"Duration":58,"Speed":0.4,"Timelines":[{"ActionTag":-1916999600,"Property":"Position","Frames":[{"X":-0.9993,"Y":0.0014,"FrameIndex":0,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":-0.9993,"Y":0.0014,"FrameIndex":9,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":-0.9993,"Y":0.0014,"FrameIndex":13,"EasingData":{"Type":0},"ctype":"PointFrameData"}],"ctype":"TimelineData"},{"ActionTag":-1916999600,"Property":"Scale","Frames":[{"X":1.0,"Y":1.0,"FrameIndex":0,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.8,"Y":0.8,"FrameIndex":9,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":1.0,"Y":1.0,"FrameIndex":13,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"}],"ctype":"TimelineData"},{"ActionTag":-1916999600,"Property":"RotationSkew","Frames":[{"X":0.0,"Y":0.0,"FrameIndex":0,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":9,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":13,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"}],"ctype":"TimelineData"},{"ActionTag":-1916999600,"Property":"VisibleForFrame","Frames":[{"Value":false,"FrameIndex":0,"Tween":false,"ctype":"BoolFrameData"},{"Value":true,"FrameIndex":9,"Tween":false,"ctype":"BoolFrameData"},{"Value":true,"FrameIndex":13,"Tween":false,"ctype":"BoolFrameData"}],"ctype":"TimelineData"},{"ActionTag":-1896166604,"Property":"Position","Frames":[{"X":0.0001,"Y":48.0004,"FrameIndex":14,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":0.0001,"Y":48.0,"FrameIndex":29,"EasingData":{"Type":0},"ctype":"PointFrameData"}],"ctype":"TimelineData"},{"ActionTag":-1896166604,"Property":"Scale","Frames":[{"X":1.0,"Y":0.3061,"FrameIndex":14,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":1.0,"Y":1.0,"FrameIndex":29,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"}],"ctype":"TimelineData"},{"ActionTag":-1896166604,"Property":"RotationSkew","Frames":[{"X":0.0,"Y":0.0,"FrameIndex":14,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":29,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"}],"ctype":"TimelineData"},{"ActionTag":-1896166604,"Property":"VisibleForFrame","Frames":[{"Value":false,"FrameIndex":0,"Tween":false,"ctype":"BoolFrameData"},{"Value":true,"FrameIndex":14,"Tween":false,"ctype":"BoolFrameData"},{"Value":true,"FrameIndex":29,"Tween":false,"ctype":"BoolFrameData"}],"ctype":"TimelineData"},{"ActionTag":-1896166604,"Property":"AnchorPoint","Frames":[{"X":0.5,"Y":1.0,"FrameIndex":14,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"}],"ctype":"TimelineData"},{"ActionTag":-1896166604,"Property":"FileData","Frames":[{"TextureFile":{"Type":"MarkedSubImage","Path":"tomato_00002.png","Plist":"tomato.plist"},"FrameIndex":9,"Tween":false,"ctype":"TextureFrameData"}],"ctype":"TimelineData"},{"ActionTag":-1896166604,"Property":"BlendFunc","Frames":[{"Src":770,"Dst":771,"FrameIndex":9,"Tween":false,"ctype":"BlendFuncFrameData"}],"ctype":"TimelineData"},{"ActionTag":799273390,"Property":"Position","Frames":[{"X":0.0002,"Y":6.0,"FrameIndex":0,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":0.0002,"Y":6.0,"FrameIndex":3,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":0.0002,"Y":6.0,"FrameIndex":8,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":0.0002,"Y":6.0,"FrameIndex":9,"EasingData":{"Type":0},"ctype":"PointFrameData"}],"ctype":"TimelineData"},{"ActionTag":799273390,"Property":"Scale","Frames":[{"X":0.9,"Y":0.9,"FrameIndex":0,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":1.0,"Y":1.0,"FrameIndex":3,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.7,"Y":0.7,"FrameIndex":8,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":1.0,"Y":1.0,"FrameIndex":9,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"}],"ctype":"TimelineData"},{"ActionTag":799273390,"Property":"RotationSkew","Frames":[{"X":0.0,"Y":0.0,"FrameIndex":0,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":3,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":8,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":9,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"}],"ctype":"TimelineData"},{"ActionTag":799273390,"Property":"FileData","Frames":[{"TextureFile":{"Type":"MarkedSubImage","Path":"tomato_00001.png","Plist":"tomato.plist"},"FrameIndex":9,"Tween":false,"ctype":"TextureFrameData"}],"ctype":"TimelineData"},{"ActionTag":799273390,"Property":"BlendFunc","Frames":[{"Src":770,"Dst":771,"FrameIndex":9,"Tween":false,"ctype":"BlendFuncFrameData"}],"ctype":"TimelineData"},{"ActionTag":799273390,"Property":"VisibleForFrame","Frames":[{"Value":true,"FrameIndex":0,"Tween":false,"ctype":"BoolFrameData"},{"Value":false,"FrameIndex":9,"Tween":false,"ctype":"BoolFrameData"}],"ctype":"TimelineData"},{"ActionTag":-2105997858,"Property":"Position","Frames":[{"X":0.0,"Y":0.0,"FrameIndex":0,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":9,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":14,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":0.0,"Y":-78.0,"FrameIndex":35,"EasingData":{"Type":0},"ctype":"PointFrameData"}],"ctype":"TimelineData"},{"ActionTag":-2105997858,"Property":"Scale","Frames":[{"X":1.0,"Y":1.0,"FrameIndex":0,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":1.0,"Y":1.0,"FrameIndex":9,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":1.0,"Y":1.0,"FrameIndex":14,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":1.0,"Y":1.0,"FrameIndex":35,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"}],"ctype":"TimelineData"},{"ActionTag":-2105997858,"Property":"RotationSkew","Frames":[{"X":0.0,"Y":0.0,"FrameIndex":0,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":9,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":14,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":35,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"}],"ctype":"TimelineData"},{"ActionTag":-2105997858,"Property":"VisibleForFrame","Frames":[{"Value":false,"FrameIndex":0,"Tween":false,"ctype":"BoolFrameData"},{"Value":true,"FrameIndex":9,"Tween":false,"ctype":"BoolFrameData"},{"Value":true,"FrameIndex":14,"Tween":false,"ctype":"BoolFrameData"},{"Value":true,"FrameIndex":35,"Tween":false,"ctype":"BoolFrameData"}],"ctype":"TimelineData"},{"ActionTag":-2105997858,"Property":"FileData","Frames":[{"TextureFile":{"Type":"MarkedSubImage","Path":"tomato_00003.png","Plist":"tomato.plist"},"FrameIndex":9,"Tween":false,"ctype":"TextureFrameData"},{"TextureFile":{"Type":"MarkedSubImage","Path":"tomato_00003.png","Plist":"tomato.plist"},"FrameIndex":14,"Tween":false,"ctype":"TextureFrameData"},{"TextureFile":{"Type":"MarkedSubImage","Path":"tomato_00003.png","Plist":"tomato.plist"},"FrameIndex":35,"Tween":false,"ctype":"TextureFrameData"}],"ctype":"TimelineData"},{"ActionTag":-2105997858,"Property":"BlendFunc","Frames":[{"Src":770,"Dst":771,"FrameIndex":9,"Tween":false,"ctype":"BlendFuncFrameData"},{"Src":770,"Dst":771,"FrameIndex":14,"Tween":false,"ctype":"BlendFuncFrameData"},{"Src":770,"Dst":771,"FrameIndex":35,"Tween":false,"ctype":"BlendFuncFrameData"}],"ctype":"TimelineData"},{"ActionTag":56038112,"Property":"Position","Frames":[{"X":-0.0001,"Y":-11.0,"FrameIndex":0,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":-0.0001,"Y":9.0,"FrameIndex":26,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":-0.0001,"Y":9.0,"FrameIndex":39,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":-0.0001,"Y":9.0,"FrameIndex":42,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":-0.0001,"Y":9.0,"FrameIndex":45,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":-0.0001,"Y":9.0,"FrameIndex":48,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":-0.0001,"Y":9.0,"FrameIndex":51,"EasingData":{"Type":0},"ctype":"PointFrameData"},{"X":-0.0001,"Y":9.0,"FrameIndex":58,"EasingData":{"Type":0},"ctype":"PointFrameData"}],"ctype":"TimelineData"},{"ActionTag":56038112,"Property":"Scale","Frames":[{"X":1.0,"Y":1.0,"FrameIndex":0,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":1.0,"Y":1.0,"FrameIndex":26,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":1.0,"Y":1.0,"FrameIndex":39,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":1.0,"Y":1.0,"FrameIndex":42,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":1.0,"Y":1.0,"FrameIndex":45,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":1.0,"Y":1.0,"FrameIndex":48,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":1.0,"Y":1.0,"FrameIndex":51,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":1.0,"Y":1.0,"FrameIndex":58,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"}],"ctype":"TimelineData"},{"ActionTag":56038112,"Property":"RotationSkew","Frames":[{"X":0.0,"Y":0.0,"FrameIndex":0,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":26,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":39,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":42,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":45,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":48,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":51,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"},{"X":0.0,"Y":0.0,"FrameIndex":58,"EasingData":{"Type":0},"ctype":"ScaleValueFrameData"}],"ctype":"TimelineData"},{"ActionTag":56038112,"Property":"VisibleForFrame","Frames":[{"Value":false,"FrameIndex":0,"Tween":false,"ctype":"BoolFrameData"},{"Value":true,"FrameIndex":26,"Tween":false,"ctype":"BoolFrameData"},{"Value":true,"FrameIndex":39,"Tween":false,"ctype":"BoolFrameData"},{"Value":true,"FrameIndex":42,"Tween":false,"ctype":"BoolFrameData"},{"Value":true,"FrameIndex":45,"Tween":false,"ctype":"BoolFrameData"},{"Value":true,"FrameIndex":48,"Tween":false,"ctype":"BoolFrameData"},{"Value":true,"FrameIndex":51,"Tween":false,"ctype":"BoolFrameData"},{"Value":true,"FrameIndex":58,"Tween":false,"ctype":"BoolFrameData"}],"ctype":"TimelineData"},{"ActionTag":56038112,"Property":"FileData","Frames":[{"TextureFile":{"Type":"MarkedSubImage","Path":"tomato_00005.png","Plist":"tomato.plist"},"FrameIndex":39,"Tween":false,"ctype":"TextureFrameData"},{"TextureFile":{"Type":"MarkedSubImage","Path":"tomato_00006.png","Plist":"tomato.plist"},"FrameIndex":42,"Tween":false,"ctype":"TextureFrameData"},{"TextureFile":{"Type":"MarkedSubImage","Path":"tomato_00005.png","Plist":"tomato.plist"},"FrameIndex":45,"Tween":false,"ctype":"TextureFrameData"},{"TextureFile":{"Type":"MarkedSubImage","Path":"tomato_00006.png","Plist":"tomato.plist"},"FrameIndex":48,"Tween":false,"ctype":"TextureFrameData"},{"TextureFile":{"Type":"MarkedSubImage","Path":"tomato_00005.png","Plist":"tomato.plist"},"FrameIndex":51,"Tween":false,"ctype":"TextureFrameData"},{"TextureFile":{"Type":"MarkedSubImage","Path":"tomato_00005.png","Plist":"tomato.plist"},"FrameIndex":58,"Tween":false,"ctype":"TextureFrameData"}],"ctype":"TimelineData"},{"ActionTag":56038112,"Property":"BlendFunc","Frames":[{"Src":770,"Dst":771,"FrameIndex":42,"Tween":false,"ctype":"BlendFuncFrameData"},{"Src":770,"Dst":771,"FrameIndex":45,"Tween":false,"ctype":"BlendFuncFrameData"},{"Src":770,"Dst":771,"FrameIndex":48,"Tween":false,"ctype":"BlendFuncFrameData"},{"Src":770,"Dst":771,"FrameIndex":51,"Tween":false,"ctype":"BlendFuncFrameData"},{"Src":770,"Dst":771,"FrameIndex":58,"Tween":false,"ctype":"BlendFuncFrameData"}],"ctype":"TimelineData"}],"ctype":"TimelineActionData"},"AnimationList":[],"ObjectData":{"Tag":3438,"Children":[{"FileData":{"Type":"MarkedSubImage","Path":"tomato_00004.png","Plist":"tomato.plist"},"BlendFunc":{"Src":770,"Dst":771},"AnchorPoint":{"ScaleX":0.5,"ScaleY":0.5},"Position":{"X":-0.9993,"Y":0.0014},"Scale":{"ScaleX":1.0,"ScaleY":1.0},"CColor":{},"IconVisible":false,"PrePosition":{"X":0.0,"Y":0.0},"PreSize":{"X":0.0,"Y":0.0},"LeftMargin":-58.9993,"RightMargin":-57.0007,"TopMargin":-53.5014,"BottomMargin":-53.4986,"Tag":3439,"ActionTag":-1916999600,"Size":{"X":116.0,"Y":107.0},"VisibleForFrame":false,"Name":"Sprite_1","ctype":"SpriteObjectData"},{"FileData":{"Type":"MarkedSubImage","Path":"tomato_00002.png","Plist":"tomato.plist"},"BlendFunc":{"Src":770,"Dst":771},"AnchorPoint":{"ScaleX":0.5,"ScaleY":1.0},"Position":{"X":0.0001,"Y":48.0004},"Scale":{"ScaleX":1.0,"ScaleY":0.3061},"CColor":{},"IconVisible":false,"PrePosition":{"X":0.0,"Y":0.0},"PreSize":{"X":0.0,"Y":0.0},"LeftMargin":-31.4999,"RightMargin":-31.5001,"TopMargin":-48.0004,"BottomMargin":-49.9996,"Tag":3440,"ActionTag":-1896166604,"Size":{"X":63.0,"Y":98.0},"VisibleForFrame":false,"Name":"Sprite_2","ctype":"SpriteObjectData"},{"FileData":{"Type":"MarkedSubImage","Path":"tomato_00001.png","Plist":"tomato.plist"},"BlendFunc":{"Src":770,"Dst":771},"AnchorPoint":{"ScaleX":0.5,"ScaleY":0.5},"Position":{"X":0.0002,"Y":6.0},"Scale":{"ScaleX":0.9,"ScaleY":0.9},"CColor":{},"IconVisible":false,"PrePosition":{"X":0.0,"Y":0.0},"PreSize":{"X":0.0,"Y":0.0},"LeftMargin":-52.9998,"RightMargin":-53.0002,"TopMargin":-63.0,"BottomMargin":-51.0,"Tag":3441,"ActionTag":799273390,"Size":{"X":106.0,"Y":114.0},"Name":"Sprite_3","ctype":"SpriteObjectData"},{"FileData":{"Type":"MarkedSubImage","Path":"tomato_00003.png","Plist":"tomato.plist"},"BlendFunc":{"Src":770,"Dst":771},"AnchorPoint":{"ScaleX":0.5,"ScaleY":0.5},"Position":{"X":0.0,"Y":0.0},"Scale":{"ScaleX":1.0,"ScaleY":1.0},"CColor":{},"IconVisible":false,"PrePosition":{"X":0.0,"Y":0.0},"PreSize":{"X":0.0,"Y":0.0},"LeftMargin":-38.0,"RightMargin":-38.0,"TopMargin":-36.0,"BottomMargin":-36.0,"Tag":4213,"ActionTag":-2105997858,"Size":{"X":76.0,"Y":72.0},"VisibleForFrame":false,"Name":"Sprite_273","ctype":"SpriteObjectData"},{"FileData":{"Type":"MarkedSubImage","Path":"tomato_00005.png","Plist":"tomato.plist"},"BlendFunc":{"Src":770,"Dst":771},"AnchorPoint":{"ScaleX":0.5,"ScaleY":0.5},"Position":{"X":-0.0001,"Y":-11.0},"Scale":{"ScaleX":1.0,"ScaleY":1.0},"CColor":{},"IconVisible":false,"PrePosition":{"X":0.0,"Y":0.0},"PreSize":{"X":0.0,"Y":0.0},"LeftMargin":-20.5001,"RightMargin":-20.4999,"TopMargin":1.0,"BottomMargin":-21.0,"Tag":3442,"ActionTag":56038112,"Size":{"X":41.0,"Y":20.0},"VisibleForFrame":false,"Name":"Sprite_4","ctype":"SpriteObjectData"}],"Size":{"X":0.0,"Y":0.0},"Name":"Node","ctype":"SingleNodeObjectData"},"UsedResources":["tomato.plist","tomato.png"],"ctype":"GameProjectData"}},"Type":"Node"}`
let str2 = `{
  "ID": "1821d15b-f5bf-42ff-b27b-a8a0b250181d",
  "Version": "3.10.0.0",
  "Name": "tomatoSkin",
  "Content": {
    "Content": {
      "Animation": {
        "Duration": 10,
        "Speed": 1.0,
        "Timelines": [
          {
            "ActionTag": -1182663267,
            "Property": "Position",
            "Frames": [
              {
                "X": -25.0,
                "Y": 19.0,
                "FrameIndex": 0,
                "EasingData": {
                  "Type": 0
                },
                "ctype": "PointFrameData"
              },
              {
                "X": -25.0,
                "Y": 19.0,
                "FrameIndex": 10,
                "EasingData": {
                  "Type": 0
                },
                "ctype": "PointFrameData"
              }
            ],
            "ctype": "TimelineData"
          },
          {
            "ActionTag": -1182663267,
            "Property": "Scale",
            "Frames": [
              {
                "X": 1.0,
                "Y": 1.0,
                "FrameIndex": 0,
                "EasingData": {
                  "Type": 0
                },
                "ctype": "ScaleValueFrameData"
              },
              {
                "X": 1.0,
                "Y": 1.0,
                "FrameIndex": 10,
                "EasingData": {
                  "Type": 0
                },
                "ctype": "ScaleValueFrameData"
              }
            ],
            "ctype": "TimelineData"
          },
          {
            "ActionTag": -1182663267,
            "Property": "RotationSkew",
            "Frames": [
              {
                "X": 0.0,
                "Y": 0.0,
                "FrameIndex": 0,
                "EasingData": {
                  "Type": 0
                },
                "ctype": "ScaleValueFrameData"
              },
              {
                "X": 0.0,
                "Y": 0.0,
                "FrameIndex": 10,
                "EasingData": {
                  "Type": 0
                },
                "ctype": "ScaleValueFrameData"
              }
            ],
            "ctype": "TimelineData"
          },
          {
            "ActionTag": -1182663267,
            "Property": "FileData",
            "Frames": [
              {
                "TextureFile": {
                  "Type": "PlistSubImage",
                  "Path": "tomato_00001.png",
                  "Plist": "tomato.plist"
                },
                "FrameIndex": 0,
                "Tween": false,
                "ctype": "TextureFrameData"
              },
              {
                "TextureFile": {
                  "Type": "PlistSubImage",
                  "Path": "tomato_00002.png",
                  "Plist": "tomato.plist"
                },
                "FrameIndex": 10,
                "Tween": false,
                "ctype": "TextureFrameData"
              }
            ],
            "ctype": "TimelineData"
          },
          {
            "ActionTag": -1182663267,
            "Property": "BlendFunc",
            "Frames": [
              {
                "Src": 1,
                "Dst": 771,
                "FrameIndex": 0,
                "Tween": false,
                "ctype": "BlendFuncFrameData"
              },
              {
                "Src": 1,
                "Dst": 771,
                "FrameIndex": 10,
                "Tween": false,
                "ctype": "BlendFuncFrameData"
              }
            ],
            "ctype": "TimelineData"
          }
        ],
        "ctype": "TimelineActionData"
      },
      "AnimationList": [],
      "ObjectData": {
        "Tag": 28,
        "Children": [
          {
            "FileData": {
              "Type": "PlistSubImage",
              "Path": "tomato_00001.png",
              "Plist": "tomato.plist"
            },
            "BlendFunc": {
              "Src": 1,
              "Dst": 771
            },
            "AnchorPoint": {
              "ScaleX": 0.5,
              "ScaleY": 0.5
            },
            "Position": {
              "X": -25.0,
              "Y": 19.0
            },
            "Scale": {
              "ScaleX": 1.0,
              "ScaleY": 1.0
            },
            "CColor": {},
            "IconVisible": false,
            "PrePosition": {
              "X": 0.0,
              "Y": 0.0
            },
            "PreSize": {
              "X": 0.0,
              "Y": 0.0
            },
            "LeftMargin": -78.0,
            "RightMargin": -28.0,
            "TopMargin": -76.0,
            "BottomMargin": -38.0,
            "Tag": 29,
            "ActionTag": -1182663267,
            "Size": {
              "X": 106.0,
              "Y": 114.0
            },
            "Name": "tomato_00001_1",
            "ctype": "SpriteObjectData"
          },
          {
            "FileData": {
              "Type": "PlistSubImage",
              "Path": "tomato_00005.png",
              "Plist": "tomato.plist"
            },
            "BlendFunc": {
              "Src": 1,
              "Dst": 771
            },
            "AnchorPoint": {
              "ScaleX": 0.5,
              "ScaleY": 0.5
            },
            "Position": {
              "X": 108.0,
              "Y": -50.0
            },
            "Scale": {
              "ScaleX": 1.0,
              "ScaleY": 1.0
            },
            "CColor": {},
            "IconVisible": false,
            "PrePosition": {
              "X": 0.0,
              "Y": 0.0
            },
            "PreSize": {
              "X": 0.0,
              "Y": 0.0
            },
            "LeftMargin": 87.5,
            "RightMargin": -128.5,
            "TopMargin": 40.0,
            "BottomMargin": -60.0,
            "Tag": 38,
            "ActionTag": -1481697578,
            "Size": {
              "X": 41.0,
              "Y": 20.0
            },
            "Name": "tomato_00005_1",
            "ctype": "SpriteObjectData"
          }
        ],
        "Size": {
          "X": 0.0,
          "Y": 0.0
        },
        "Name": "Node",
        "ctype": "SingleNodeObjectData"
      },
      "UsedResources": [
        "tomato.plist",
        "tomato.png"
      ],
      "ctype": "GameFileData"
    }
  },
  "Type": "Node"
}`
let jsonstr = JSON.parse(str2)
let { keys } = Object;
let newt = {}
const FrameNames = {
  Position:"PointFrame",
  Scale:"ScaleFrame",
  RotationSkew:"ScaleFrame",
  FileData:"TextureFrame",
  BlendFunc:"lendFuncFrame",
}
const fortimeline = function(table, newtt){
  console.log(table)
  let len = table.length
  const forFrames = function(t, nt){
    let len = t.length
    for(let i = 0;i<len;i++){
      let val = t[i]
      nt[i]={}
      for (let key of keys(val)) {
        let v = val[key]
        if(key == "ctype"){
        }else{
         nt[i][key] = v;
        }
      }
    }
  }
  const inTimeline = function(t, nt, fName){
    for (let key of keys(t)) {
      let val = t[key]
      if (key == "Frames"){
        nt[fName] = [];
        forFrames(val, nt[fName])
      }else if(key == "ctype"){
      }
      else{
        nt[key] = `"${val.toString()}"`
      }
    }
  } 
  for(let i = 0;i<len;i++){
    let val = table[i]
    newtt[i] = {}
    let pro = val['Property']
    let fName = FrameNames[pro]
    if(!fName){
      console.log(pro, "pro不存在")
      break;
    }
    inTimeline(val, newtt[i], fName)
  }
}
const fortable = function(table, newtt){
  for (let key of keys(table)) {
    let val = table[key]
    if(typeof(val) == "object"){
      if(key == "Timelines"){
        newtt["Timeline"] = []
        fortimeline(val, newtt["Timeline"])
      }else{
        newtt[key] = {}
        fortable(val, newtt[key])
      }
      
    }else{
      if (typeof(val) == "boolean"){
        if (val){
          newtt[key] = `"True"`
        }else{
          newtt[key] = `"False"`
        }
      }else{
        if (key == "ctype"){
        }else{
          newtt[key] = `"${val.toString()}"`
        }
       
      }
      
    }
  }
}
fortable(jsonstr, newt)
console.log(newt)
// for (let key of keys(jsonstr)) {
// 	let val = jsonstr[key]
// 	console.log(key, val)
// }
  let xmlstr =  builder.buildObject(jsonstr);
// console.log(xmlstr.toString())

let str1 = `{"PropertyGroup":{
  "ID": "1821d15b-f5bf-42ff-b27b-a8a0b250181d",
  "Version": "3.10.0.0",
  "Name": "tomatoSkin",
  "Type": "Node"
}}`
let jsonstr1 = JSON.parse(str1)
// console.log(jsonstr1)
const formatToXml = function(jsonobj){
 for(let key of keys(jsonobj)){
  let val = jsonobj[key];
  if (typeof(val) == "object"){

  }
 }
}